﻿<%@ WebHandler Language="C#" Class="updateroom" %>

using System;
using System.Web;

public class updateroom : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        string strXML = "1";
        try
        {            
            string idRoom = context.Request.QueryString["r"];
            string tinhtrang = context.Request.QueryString["t"];
            LibQLKS.LeTan.LT_Phong phong = new LibQLKS.LeTan.LT_Phong();            
            bool f = phong.UpdateRoom(14, Convert.ToInt64(idRoom), Convert.ToInt16(tinhtrang));
            if (f){
                strXML = "1";
            }
            else {
                strXML = "0";
            }
        }
        catch { strXML = "0"; }
        context.Response.ContentType = "text/plain";
        context.Response.Write(strXML.ToString());
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}